import { getData, postData } from '../../../untils/request';

// 通过用户id查找用户
export async function getUserInfo(id) {
    const result = await getData(`/user/getUserById/${id}`);
    return result;
}

// 发送消息
export async function sendMessage(data) {
    const result = await postData(`/chat/send`, data);
    return result;
}

// 查找消息
export async function getMessage(data) {
    const result = await postData(`/chat/find`, data);
    return result;
}

// 阅读消息
export async function readMessage(data) {
  const result = await postData(`/chat/readChat`, data);
  return result;
}
